<?php
class TAuth
{
	const ID_KEY = 'access_token';

	static function build_token($randnum)
	{
		return md5(time() . $randnum);
	}

	static function check($token, $code_buildtime)
	{
		if (empty($token)) return false;
		return time() > ($code_buildtime + 7200) ? false : true;
	}

}